#ifndef _PRIMITIVE_H
#define _PRIMITIVE_H

#include "Common.h"
#include "Ray.h"
#include "Material.h"

namespace Pandora
{
	class CPrimitive
	{
	protected:
		CMaterial material;
	public:
		virtual int Intersect(CRay& ray, float &t) = 0;
		virtual int Intersect(CRay* ray, float &t) = 0;
		virtual CVector3 GetNormal(CVector3& pos) = 0;
		virtual CVector3 GetNormal(CVector3* pos) = 0;
		virtual CVector3& GetPosition() = 0;
		virtual PRIMITIVES GetType() = 0;

		CMaterial& GetMaterial() { return material; }
		CColor& GetColor() { return material.GetColor(); }
		
		void  SetMaterial(CMaterial& mat) { material = mat; }
		void  SetMaterial(CMaterial* mat) { material = *mat; }
		
	};

}; //namespace Pandora

#endif /* _PRIMITIVE_H */